package material.observer;

/**
 * 气象站
 */
public class WeathStation {
    public static void main(String[] args) {
//        WeatherData weatherData = new WeatherData();
//        CurrentConditionDisplay currentConditionDisplay = new CurrentConditionDisplay(weatherData);
//        ForecastDisplay forecastDisplay = new ForecastDisplay(weatherData);
//        HeatIndexDisplay heatIndexDisplay = new HeatIndexDisplay(weatherData);
//        StatisticsDisplay statisticsDisplay = new StatisticsDisplay(weatherData);
//        weatherData.setMeasurements(80, 65, 30.4f);

        /**java内部观察者对象测试**/
        WeatherDataInner weatherDataInner = new WeatherDataInner();
        CurrentConditionsDisplayInner currentConditionsDisplayInner = new CurrentConditionsDisplayInner(weatherDataInner);
        ForecastDisplayInner forecastDisplayInner = new ForecastDisplayInner(weatherDataInner);
        weatherDataInner.setMeasurements(80, 65, 30.4f);
    }
}
